package com.czkt.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.czkt.entity.Storage;
import com.czkt.entity.vo.StorageProduct;
import com.czkt.mapper.StorageMapper;
import com.czkt.service.IStorageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2024-06-18
 */
@Service
public class StorageServiceImpl extends ServiceImpl<StorageMapper, Storage> implements IStorageService {
    @Resource
    StorageMapper storageMapper;

    @Override
    public IPage<StorageProduct> selectStorageAndProduct(String stkWarehouse, String prodName, Integer pageIndex, Integer pageSize) {
        Page<StorageProduct> storageProductPage = new Page<>(pageIndex,pageSize);
        return storageMapper.selectStorageAndProduct(storageProductPage,stkWarehouse, prodName);
    }
}
